/*
 * Copyright (C) The Apache Software Foundation. All rights reserved.
 *
 * This software is published under the terms of the Apache Software License
 * version 1.1, a copy of which has been included with this distribution in
 * the LICENSE file.
 */
package ranab.server.ftp.gui;

import java.awt.BorderLayout;
import java.awt.Component;
import java.net.URL;

import ranab.gui.MiniBrowserPane;
import ranab.server.ftp.FtpConfig;

/**
 * Displays <a href="about.html">about.html</a> page.
 *
 * @author <a href="mailto:rana_b@yahoo.com">Rana Bhattacharyya</a>
 */
public
class FtpAboutPanel extends PluginPanel {
    
    public final static String INDEX_PAGE = "ranab/server/ftp/gui/help/index.html";

    private MiniBrowserPane mBrowser;
  
    /**
     * Constructor.
     */
    public FtpAboutPanel(FtpTree tree) {
        super(tree);
        setLayout(new BorderLayout());
        
        Component frame = getTree().getTopFrame();
        URL home = getClass().getClassLoader().getResource(INDEX_PAGE);
        mBrowser = new MiniBrowserPane(frame, home, true, true);
        add(mBrowser, BorderLayout.CENTER);
    }
    
    /**
     * Reload new configuration - does nothing
     */ 
    public void refresh(FtpConfig config) {
    }
    
    /**
     * Is displayable in the root pane.
     */
    public boolean isDisplayable() {
        return true;
    } 
    
}
